(function(t){if(t.Vuex){return}(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?module.exports=e():typeof define==="function"&&define.amd?define(e):t.Vuex=e();if(!t.Vuex){t.Vuex=e()}})(this,function(){"use strict";var e=function(t){var e=Number(t.version.split(".")[0]);if(e>=2){t.mixin({beforeCreate:r})}else{var n=t.prototype._init;t.prototype._init=function(t){if(t===void 0)t={};t.init=t.init?[r].concat(t.init):r;n.call(this,t)}}function r(){var t=this.$options;if(t.store){this.$store=typeof t.store==="function"?t.store():t.store}else if(t.parent&&t.parent.$store){this.$store=t.parent.$store}}};var n=typeof t!=="undefined"&&t.__VUE_DEVTOOLS_GLOBAL_HOOK__;function r(t){if(!n){return}t._devtoolHook=n;n.emit("vuex:init",t);n.on("vuex:travel-to-state",function(e){t.replaceState(e)});t.subscribe(function(t,e){n.emit("vuex:mutation",t,e)})}function o(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function i(t){return t!==null&&typeof t==="object"}function a(t){return t&&typeof t.then==="function"}function s(t,e){if(!t){throw new Error("[vuex] "+e)}}var u=function t(e,n){this.runtime=n;this._children=Object.create(null);this._rawModule=e;var r=e.state;this.state=(typeof r==="function"?r():r)||{}};var c={namespaced:{configurable:true}};c.namespaced.get=function(){return!!this._rawModule.namespaced};u.prototype.addChild=function t(e,n){this._children[e]=n};u.prototype.removeChild=function t(e){delete this._children[e]};u.prototype.getChild=function t(e){return this._children[e]};u.prototype.update=function t(e){this._rawModule.namespaced=e.namespaced;if(e.actions){this._rawModule.actions=e.actions}if(e.mutations){this._rawModule.mutations=e.mutations}if(e.getters){this._rawModule.getters=e.getters}};u.prototype.forEachChild=function t(e){o(this._children,e)};u.prototype.forEachGetter=function t(e){if(this._rawModule.getters){o(this._rawModule.getters,e)}};u.prototype.forEachAction=function t(e){if(this._rawModule.actions){o(this._rawModule.actions,e)}};u.prototype.forEachMutation=function t(e){if(this._rawModule.mutations){o(this._rawModule.mutations,e)}};Object.defineProperties(u.prototype,c);var f=function t(e){this.register([],e,false)};f.prototype.get=function t(e){return e.reduce(function(t,e){return t.getChild(e)},this.root)};f.prototype.getNamespace=function t(e){var n=this.root;return e.reduce(function(t,e){n=n.getChild(e);return t+(n.namespaced?e+"/":"")},"")};f.prototype.update=function t(e){l([],this.root,e)};f.prototype.register=function t(e,n,r){var i=this;if(r===void 0)r=true;{v(e,n)}var a=new u(n,r);if(e.length===0){this.root=a}else{var s=this.get(e.slice(0,-1));s.addChild(e[e.length-1],a)}if(n.modules){o(n.modules,function(t,n){i.register(e.concat(n),t,r)})}};f.prototype.unregister=function t(e){var n=this.get(e.slice(0,-1));var r=e[e.length-1];if(!n.getChild(r).runtime){return}n.removeChild(r)};function l(t,e,n){{v(t,n)}e.update(n);if(n.modules){for(var r in n.modules){if(!e.getChild(r)){{console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, "+"manual reload is needed")}return}l(t.concat(r),e.getChild(r),n.modules[r])}}}var p={assert:function(t){return typeof t==="function"},expected:"function"};var h={assert:function(t){return typeof t==="function"||typeof t==="object"&&typeof t.handler==="function"},expected:'function or object with "handler" function'};var d={getters:p,mutations:p,actions:h};function v(t,e){Object.keys(d).forEach(function(n){if(!e[n]){return}var r=d[n];o(e[n],function(e,o){s(r.assert(e),m(t,n,o,e,r.expected))})})}function m(t,e,n,r,o){var i=e+" should be "+o+' but "'+e+"."+n+'"';if(t.length>0){i+=' in module "'+t.join(".")+'"'}i+=" is "+JSON.stringify(r)+".";return i}var y;var g=function e(n){var o=this;if(n===void 0)n={};if(!y&&typeof t!=="undefined"&&t.Vue){V(t.Vue)}{s(y,"must call Vue.use(Vuex) before creating a store instance.");s(typeof Promise!=="undefined","vuex requires a Promise polyfill in this browser.");s(this instanceof e,"Store must be called with the new operator.")}var i=n.plugins;if(i===void 0)i=[];var a=n.strict;if(a===void 0)a=false;var u=n.state;if(u===void 0)u={};if(typeof u==="function"){u=u()||{}}this._committing=false;this._actions=Object.create(null);this._actionSubscribers=[];this._mutations=Object.create(null);this._wrappedGetters=Object.create(null);this._modules=new f(n);this._modulesNamespaceMap=Object.create(null);this._subscribers=[];this._watcherVM=new y;var c=this;var l=this;var p=l.dispatch;var h=l.commit;this.dispatch=function t(e,n){return p.call(c,e,n)};this.commit=function t(e,n,r){return h.call(c,e,n,r)};this.strict=a;$(this,u,[],this._modules.root);x(this,u);i.forEach(function(t){return t(o)});if(y.config.devtools){r(this)}};var _={state:{configurable:true}};_.state.get=function(){return this._vm._data.$$state};_.state.set=function(t){{s(false,"Use store.replaceState() to explicit replace store state.")}};g.prototype.commit=function t(e,n,r){var o=this;var i=S(e,n,r);var a=i.type;var s=i.payload;var u=i.options;var c={type:a,payload:s};var f=this._mutations[a];if(!f){{console.error("[vuex] unknown mutation type: "+a)}return}this._withCommit(function(){f.forEach(function t(e){e(s)})});this._subscribers.forEach(function(t){return t(c,o.state)});if("development"!=="production"&&u&&u.silent){console.warn("[vuex] mutation type: "+a+". Silent option has been removed. "+"Use the filter functionality in the vue-devtools")}};g.prototype.dispatch=function t(e,n){var r=this;var o=S(e,n);var i=o.type;var a=o.payload;var s={type:i,payload:a};var u=this._actions[i];if(!u){{console.error("[vuex] unknown action type: "+i)}return}this._actionSubscribers.forEach(function(t){return t(s,r.state)});return u.length>1?Promise.all(u.map(function(t){return t(a)})):u[0](a)};g.prototype.subscribe=function t(e){return b(e,this._subscribers)};g.prototype.subscribeAction=function t(e){return b(e,this._actionSubscribers)};g.prototype.watch=function t(e,n,r){var o=this;{s(typeof e==="function","store.watch only accepts a function.")}return this._watcherVM.$watch(function(){return e(o.state,o.getters)},n,r)};g.prototype.replaceState=function t(e){var n=this;this._withCommit(function(){n._vm._data.$$state=e})};g.prototype.registerModule=function t(e,n,r){if(r===void 0)r={};if(typeof e==="string"){e=[e]}{s(Array.isArray(e),"module path must be a string or an Array.");s(e.length>0,"cannot register the root module by using registerModule.")}this._modules.register(e,n);$(this,this.state,e,this._modules.get(e),r.preserveState);x(this,this.state)};g.prototype.unregisterModule=function t(e){var n=this;if(typeof e==="string"){e=[e]}{s(Array.isArray(e),"module path must be a string or an Array.")}this._modules.unregister(e);this._withCommit(function(){var t=A(n.state,e.slice(0,-1));y.delete(t,e[e.length-1])});w(this)};g.prototype.hotUpdate=function t(e){this._modules.update(e);w(this,true)};g.prototype._withCommit=function t(e){var n=this._committing;this._committing=true;e();this._committing=n};Object.defineProperties(g.prototype,_);function b(t,e){if(e.indexOf(t)<0){e.push(t)}return function(){var n=e.indexOf(t);if(n>-1){e.splice(n,1)}}}function w(t,e){t._actions=Object.create(null);t._mutations=Object.create(null);t._wrappedGetters=Object.create(null);t._modulesNamespaceMap=Object.create(null);var n=t.state;$(t,n,[],t._modules.root,true);x(t,n,e)}function x(t,e,n){var r=t._vm;t.getters={};var i=t._wrappedGetters;var a={};o(i,function(e,n){a[n]=function(){return e(t)};Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:true})});var s=y.config.silent;y.config.silent=true;t._vm=new y({data:{$$state:e},computed:a});y.config.silent=s;if(t.strict){C(t)}if(r){if(n){t._withCommit(function(){r._data.$$state=null})}y.nextTick(function(){return r.$destroy()})}}function $(t,e,n,r,o){var i=!n.length;var a=t._modules.getNamespace(n);if(r.namespaced){t._modulesNamespaceMap[a]=r}if(!i&&!o){var s=A(e,n.slice(0,-1));var u=n[n.length-1];t._withCommit(function(){y.set(s,u,r.state)})}var c=r.context=M(t,a,n);r.forEachMutation(function(e,n){var r=a+n;j(t,r,e,c)});r.forEachAction(function(e,n){var r=e.root?n:a+n;var o=e.handler||e;E(t,r,o,c)});r.forEachGetter(function(e,n){var r=a+n;k(t,r,e,c)});r.forEachChild(function(r,i){$(t,e,n.concat(i),r,o)})}function M(t,e,n){var r=e==="";var o={dispatch:r?t.dispatch:function(n,r,o){var i=S(n,r,o);var a=i.payload;var s=i.options;var u=i.type;if(!s||!s.root){u=e+u;if("development"!=="production"&&!t._actions[u]){console.error("[vuex] unknown local action type: "+i.type+", global type: "+u);return}}return t.dispatch(u,a)},commit:r?t.commit:function(n,r,o){var i=S(n,r,o);var a=i.payload;var s=i.options;var u=i.type;if(!s||!s.root){u=e+u;if("development"!=="production"&&!t._mutations[u]){console.error("[vuex] unknown local mutation type: "+i.type+", global type: "+u);return}}t.commit(u,a,s)}};Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return O(t,e)}},state:{get:function(){return A(t.state,n)}}});return o}function O(t,e){var n={};var r=e.length;Object.keys(t.getters).forEach(function(o){if(o.slice(0,r)!==e){return}var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:true})});return n}function j(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push(function e(o){n.call(t,r.state,o)})}function E(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push(function e(o,i){var s=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},o,i);if(!a(s)){s=Promise.resolve(s)}if(t._devtoolHook){return s.catch(function(e){t._devtoolHook.emit("vuex:error",e);throw e})}else{return s}})}function k(t,e,n,r){if(t._wrappedGetters[e]){{console.error("[vuex] duplicate getter key: "+e)}return}t._wrappedGetters[e]=function t(e){return n(r.state,r.getters,e.state,e.getters)}}function C(t){t._vm.$watch(function(){return this._data.$$state},function(){{s(t._committing,"Do not mutate vuex store state outside mutation handlers.")}},{deep:true,sync:true})}function A(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function S(t,e,n){if(i(t)&&t.type){n=e;e=t;t=t.type}{s(typeof t==="string","Expects string as the type, but found "+typeof t+".")}return{type:t,payload:e,options:n}}function V(t){if(y&&t===y){{console.error("[vuex] already installed. Vue.use(Vuex) should be called only once.")}return}y=t;e(y)}var G=D(function(t,e){var n={};L(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=this.$store.state;var r=this.$store.getters;if(t){var i=T(this.$store,"mapState",t);if(!i){return}n=i.context.state;r=i.context.getters}return typeof o==="function"?o.call(this,n,r):n[o]};n[r].vuex=true});return n});var N=D(function(t,e){var n={};L(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i=this.$store.commit;if(t){var a=T(this.$store,"mapMutations",t);if(!a){return}i=a.context.commit}return typeof o==="function"?o.apply(this,[i].concat(n)):i.apply(this.$store,[o].concat(n))}});return n});var P=D(function(t,e){var n={};L(e).forEach(function(e){var r=e.key;var o=e.val;o=t+o;n[r]=function e(){if(t&&!T(this.$store,"mapGetters",t)){return}if("development"!=="production"&&!(o in this.$store.getters)){console.error("[vuex] unknown getter: "+o);return}return this.$store.getters[o]};n[r].vuex=true});return n});var H=D(function(t,e){var n={};L(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i=this.$store.dispatch;if(t){var a=T(this.$store,"mapActions",t);if(!a){return}i=a.context.dispatch}return typeof o==="function"?o.apply(this,[i].concat(n)):i.apply(this.$store,[o].concat(n))}});return n});var U=function(t){return{mapState:G.bind(null,t),mapGetters:P.bind(null,t),mapMutations:N.bind(null,t),mapActions:H.bind(null,t)}};function L(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function D(t){return function(e,n){if(typeof e!=="string"){n=e;e=""}else if(e.charAt(e.length-1)!=="/"){e+="/"}return t(e,n)}}function T(t,e,n){var r=t._modulesNamespaceMap[n];if("development"!=="production"&&!r){console.error("[vuex] module namespace not found in "+e+"(): "+n)}return r}var q={Store:g,install:V,version:"3.0.1",mapState:G,mapMutations:N,mapGetters:P,mapActions:H,createNamespacedHelpers:U};return q});Vue.use(Vuex)})(window);
//# sourceMappingURL=vuex.map.js